<%-- 
    Document   : index
    Created on : 17 janv. 2012, 11:39:45
    Author     : assia
--%>

<%@page contentType="text/html" pageEncoding="windows-1252"%>

<%@taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%> 
<%@ taglib prefix="sql" uri="http://java.sun.com/jsp/jstl/sql" %>
<!DOCTYPE html>
<html>
    <head>
        <meta http-equiv="Content-Type" content="text/html; charset=windows-1252">
        <title>JSP Page</title>
    </head>
    <body>
        <h1>JSP Page</h1>


    <sql:query var = "queryresults" dataSource = "jdbc/WebTest1"> 
        SELECT * FROM users
    </sql:query> 
        <table border=1>
            <tr>
                <th>ID</th><th>PRENOM</th><th>NOM</th>
            </tr>

            <c:forEach var="row" items="${queryresults.rows}">
                <tr>
                    <td><c:out value="${row.ID}" /></td>
                    <td><c:out value="${row.PRENOM}" /></td>
                    <td><c:out value="${row.NOM}" /></td>
                </tr>

            </c:forEach>  
        </table>

    </body>   
</html>



